using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;

namespace Crossborder.Domian.Products
{
    public class Categorys : BaseEntity
    {
        /// <summary>
        /// 品类Id
        /// </summary>
        /// <value></value>
        [Comment("品类Id")]
        public string CategoryId { get; set; }

        /// <summary>
        /// 品类名称
        /// </summary>
        /// <value></value>
        [Comment("品类名称")]
        public string CategoryName { get; set; }

        /// <summary>
        /// 品类父级Id（默认为 0）
        /// </summary>
        /// <value></value>
        [Comment("品类父级Id（默认为 0）")]
        public string? ParentId { get; set; }

        /// <summary>
        /// 等级（默认为 0）
        /// </summary>
        /// <value></value>
        [Comment("等级（默认为 0）")]
        public int? Level { get; set; }

        public void Create()
        {
            this.CategoryId = Guid.NewGuid().ToString();
            this.CreateDate = DateTime.Now;
            this.IsEnabled = true;
            this.IsDelete = false;
        }
    }
}